package com.example.fang.demodruid.concurrency5;


public class MyTest6 {

    public static void main(String[] args){
           ThreadLocal<String> threadLocal=new ThreadLocal();
           threadLocal.set("hello world");
           System.out.println(threadLocal.get());
           threadLocal.set("welcome");
           System.out.println(threadLocal.get());
           Thread t=Thread.currentThread();
           long id=t.getId();
           System.out.println("线程id"+id);
    }
}
